package cn.edu.zut.service.Impl;

import cn.edu.zut.dao.ContestDao;
import cn.edu.zut.domain.Contest;
import cn.edu.zut.service.ContestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ContestServiceImpl implements ContestService {
    @Autowired
    private ContestDao contestDao;

    @Override
    public void add(Contest contest) {
        contestDao.add(contest);
    }

    @Override
    public List<Contest> queryByName(String contestName) {
        return contestDao.queryByName(contestName);
    }

    @Override
    public List<Contest> queryAll() {
        return contestDao.queryAll();
    }

    @Override
    public void modifyContest(Contest contest) {
        contestDao.modifyContest(contest);
    }

    @Override
    public void deleteContest(Contest contest) {
        contestDao.deleteContest(contest);
    }

    @Override
    public Contest findById(int id) {
        return contestDao.findById(id);
    }
}
